UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nM4kcPHReRwMlQJLHZZCbMzsAesbDp/8ctDd2KBomzM='
WHERE
key_id = '403226f743eb17ba85dae91978ce3c78756629d844fba9dd8e62e43ff0ccf210'
AND (
token = 'nM4kcPHReRwMlQJLHZZCbMzsAesbDp/8ctDd2KBomzM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)