UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yLQUQbl3TOjHEDUrS+bw053JLDuNGRKdza3SHMkvIHs=' 
WHERE 
  key_id = '7a633b93ea6ca9ec3374426a275a3995e4acaf8139a062860bc7e42e696fb005' 
  AND (
    token = 'yLQUQbl3TOjHEDUrS+bw053JLDuNGRKdza3SHMkvIHs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00086