UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rVupoh4dHIcNnTc3KsDDBoQRLEDpxGwNIP6/3ZzEigs=' 
WHERE 
  key_id = 'e7163837a74b162efc90e680e219149288b77bb9663d0f9861ae963b9118855b' 
  AND (
    token = 'rVupoh4dHIcNnTc3KsDDBoQRLEDpxGwNIP6/3ZzEigs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033