UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'A/XzmizUGU7xfAG6fdqzY6JicP69BkToaW5PmTGH6So='
WHERE
key_id = '95298b8363cc0b3bfb003d03fc8be954d0fd31f507872154d084be4c3db7b494'
AND (
token = 'A/XzmizUGU7xfAG6fdqzY6JicP69BkToaW5PmTGH6So='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)