UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zJePUydxjkg+Mj4QOvQxTBWxsmxZaZX1vE5G9sF4q5A=' 
WHERE 
  key_id = 'b5282b4c7437839b9f796a471ad841c54adc33ae6a9fe97d549a03cbc4727c00' 
  AND (
    token = 'zJePUydxjkg+Mj4QOvQxTBWxsmxZaZX1vE5G9sF4q5A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020