UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ztUl97IApg/ZqozRIN0zc5nz8BMjfz5HgXwoaW2DQuM='
WHERE
key_id = 'df5d4144b3482cee8b7dfceed2e275282ffc350d8e2457dc90fdbed1e3f75c4b'
AND (
token = 'ztUl97IApg/ZqozRIN0zc5nz8BMjfz5HgXwoaW2DQuM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)