UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+59F/q/GyB+EUbF9WilGZqOyngvtqOqFFX56ljtj38E=' 
WHERE 
  key_id = '5d3a3ca8c7fa42bcdaaf66edb507e4068250e200dfe2fccc943bb09968ee430c' 
  AND (
    token = '+59F/q/GyB+EUbF9WilGZqOyngvtqOqFFX56ljtj38E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021