UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xsa0y2L3svDe/1GuQhi4xZ5OnZLD9gsLTHKhvPc5Fs8=' 
WHERE 
  key_id = '88d894bc3be42d723f9636e4e29ab5a6177f2df1f3e49e6cde3eea327044c39b' 
  AND (
    token = 'xsa0y2L3svDe/1GuQhi4xZ5OnZLD9gsLTHKhvPc5Fs8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018