UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7Gooe+ZhXK/1xPpaZWW/UzorTLTSviZnZIu8enFjSgU=' 
WHERE 
  key_id = '9ef0f25c2dec332da8b3a7c7e971cf2cadc4b20282e04277fd07cf4609a9b4ed' 
  AND (
    token = '7Gooe+ZhXK/1xPpaZWW/UzorTLTSviZnZIu8enFjSgU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031