UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vJ7Bgg9oLSYx4PWMC+RkKpH5/KBs3n3neWZXulXmZgQ='
WHERE
key_id = '83bd82639fbcf85cbea2591c730cc04a725606cac3e18ba814ee23f4ea2dc03f'
AND (
token = 'vJ7Bgg9oLSYx4PWMC+RkKpH5/KBs3n3neWZXulXmZgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)