UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PYWBBRF+cIYRdKGp42oKwO8+4RBJwkPQ2SpvyDNVKTg=' 
WHERE 
  key_id = '553f48b99084feb8693ab3c0e45c4fca82334a2010dcea5fab79ddf44c9908bf' 
  AND (
    token = 'PYWBBRF+cIYRdKGp42oKwO8+4RBJwkPQ2SpvyDNVKTg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031