UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PokZHS0B4QOk/Xn2S/Vqe9cJ8+e9NOR6M0RTytAplZw=' 
WHERE 
  key_id = 'acc5b99532ca58b595776c5dc0bf6b8be0d8267bf9f2aaf607d1941ce94e9b0a' 
  AND (
    token = 'PokZHS0B4QOk/Xn2S/Vqe9cJ8+e9NOR6M0RTytAplZw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018