UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LJW4av2OpiK1LD9eGh75UN99u5e9aj7cQmwCJ1UjZoA=' 
WHERE 
  key_id = 'acd26c9b749f9c9a9704aaba1895d10305906c16d0c2715e3ab051c7a4154a7f' 
  AND (
    token = 'LJW4av2OpiK1LD9eGh75UN99u5e9aj7cQmwCJ1UjZoA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030