UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ax9/jWqmDqvpLy6K5SxfHpghi4CrUAEAblxnwi5RwrI='
WHERE
key_id = '55c7e3d6a61091f41db1238a6d4f1bc73a8caa63bac200fa1ec612c49e6df62a'
AND (
token = 'Ax9/jWqmDqvpLy6K5SxfHpghi4CrUAEAblxnwi5RwrI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)