UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1MEIKcFvs0v4yceAkJ+zb35r4sSNC+ZrHAZOzXFDuQw='
WHERE
key_id = '13cba4108c616ddabfeac99417603fba0b588e35afdf3d9b70aa7424b056cbbb'
AND (
token = '1MEIKcFvs0v4yceAkJ+zb35r4sSNC+ZrHAZOzXFDuQw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)