UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kUIABfQYu/uU/Bx1zaNRQk2XXNSsD3zAyt7W2V2/59w=' 
WHERE 
  key_id = 'c4ff1896c3797dd48f546b944772f6492a7a0b9a0f36c96adf14f0f83708c894' 
  AND (
    token = 'kUIABfQYu/uU/Bx1zaNRQk2XXNSsD3zAyt7W2V2/59w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038