UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cf8Zltm/GJQQUr276dnbOPqLCGTuq1vmSgi/FVzGp/Q='
WHERE
key_id = '6700ccb1317451014e1555465c56e13abc90f31889477dcf8c5cd058c56e4d8f'
AND (
token = 'cf8Zltm/GJQQUr276dnbOPqLCGTuq1vmSgi/FVzGp/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)