UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+zMMI+53XGT9cb/U9BAePVU8PcZlU+L7rQaHcfCHSK8=' 
WHERE 
  key_id = '5b4ac5709019a692f4a73ce74e9b49db7bf75fac4aa135accd4410e5d82f1c83' 
  AND (
    token = '+zMMI+53XGT9cb/U9BAePVU8PcZlU+L7rQaHcfCHSK8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017