UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zQsxlXSxjjdwMtJaiyCKHZ+u+OEC1Xdu2ejSaZME/kk='
WHERE
key_id = '88901bf2bcd3afe5a47369b54f1310bdb8e25fb55df14d40fac293840a51d150'
AND (
token = 'zQsxlXSxjjdwMtJaiyCKHZ+u+OEC1Xdu2ejSaZME/kk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)