UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vxSUVmY2f0nGv+Ijh02+SeSMOZ90ggm3FQ+OJhZEWbU='
WHERE
key_id = '7c3d49b29d7ed94c94da39b044e54a05fd10609404d91005cf87a8e6ce73aea9'
AND (
token = 'vxSUVmY2f0nGv+Ijh02+SeSMOZ90ggm3FQ+OJhZEWbU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)