UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NOdkK5qwq/HxQ9kp6i/bnG2sR6wlTvmthEC7z5LUCrg='
WHERE
key_id = 'e451c71d2e9c0c3dd214c46b243bbf0179c821930bb038aca5ebfa7ab6bcd551'
AND (
token = 'NOdkK5qwq/HxQ9kp6i/bnG2sR6wlTvmthEC7z5LUCrg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)