UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F17luATZ5BWuv9o/HNL2A5w31iUUMYlbQbeuXWPlYh4='
WHERE
key_id = '62d4415114e8842dd83ce4ac7ee38f658775cd04c6955d78274d13a3bfde1943'
AND (
token = 'F17luATZ5BWuv9o/HNL2A5w31iUUMYlbQbeuXWPlYh4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)