UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vPghxI0D8cVfiocBQQvpsmAMlYbqLjDzKkf41+5keXU='
WHERE
key_id = '637413b8917bf2511d81232bc6d6369fec2bf733cb0c212c285ae2f3118969b2'
AND (
token = 'vPghxI0D8cVfiocBQQvpsmAMlYbqLjDzKkf41+5keXU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)