UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3llPQ7RWDAIMI0tcytek/2z2i1G8Asme3dSfFwRJvO8=' 
WHERE 
  key_id = 'fc406f68708ffe0c090c6c28d5610d8692fe0a0f7aaa1e8356b83b8c2f2790f2' 
  AND (
    token = '3llPQ7RWDAIMI0tcytek/2z2i1G8Asme3dSfFwRJvO8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00057