UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/ZXDGn34He4OdpLJnFoHNu6hW6f3xvyBnVDYxJJsW9g=' 
WHERE 
  key_id = '21cf302e0283211195bb424b9ebe6e7ebd890285114640cc4738f257ff8cc6dc' 
  AND (
    token = '/ZXDGn34He4OdpLJnFoHNu6hW6f3xvyBnVDYxJJsW9g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035