UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IqVxyxbkpj2iVmRyK6VRWP++Lvfe/1MF9vWclHbGtD4=' 
WHERE 
  key_id = '9763988deb3c3a2d25cca3170ca277b6f85f2bbb51edfe1b52ce1f9c098f8513' 
  AND (
    token = 'IqVxyxbkpj2iVmRyK6VRWP++Lvfe/1MF9vWclHbGtD4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028