UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HXurd6bLHXOZ26Px6zh1kM992s/CHFEFOI4sx5vLvEc=' 
WHERE 
  key_id = 'c5bb8a33ef44e53b26eee835238d242551becbb0033215c8fd4cfd5a3cb52eaa' 
  AND (
    token = 'HXurd6bLHXOZ26Px6zh1kM992s/CHFEFOI4sx5vLvEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040