UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cxHbmP/LeJKCO8U0Fu+i/SWn7GVV1PDylym4vOvZQPk=' 
WHERE 
  key_id = 'fe0189ff2bcff78488c9cc5ca246685fbd9ad7089c022d5a8ffb8612ad504f1e' 
  AND (
    token = 'cxHbmP/LeJKCO8U0Fu+i/SWn7GVV1PDylym4vOvZQPk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035