UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3HC1yddBHBRlgvF6/2kXfxFGqUqjK6wJBIkEdsUJuCo=' 
WHERE 
  key_id = '79c5c44319142da18a82a14ad639550e74d36b2e158755813559f8a92fe12b76' 
  AND (
    token = '3HC1yddBHBRlgvF6/2kXfxFGqUqjK6wJBIkEdsUJuCo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037