UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '86pr6hj5of2JrYoNisPDAMdvvaFed+j733LjucDUZzU=' 
WHERE 
  key_id = '60309eaffaa79ccfe26c61177cd406bae6aa4d0b44f3b31bc91039db76644c82' 
  AND (
    token = '86pr6hj5of2JrYoNisPDAMdvvaFed+j733LjucDUZzU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039