UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+l2rgCxrMxS7cMptACapLj0voFjRwtkJ7z3wdCbAJXg=' 
WHERE 
  key_id = 'd14e6c515114fb9d299942fd3e0503a5cbaaf16595efcdae8aa68ee16aa76cef' 
  AND (
    token = '+l2rgCxrMxS7cMptACapLj0voFjRwtkJ7z3wdCbAJXg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027