UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b6wKKWD6cRx8/oQtnJfeR+rltQZ+drzJBrHlxgDqmZI='
WHERE
key_id = '4b204ce8d93b9d3e9389201c641681aff87426f142f38369bf694235eeafbe8e'
AND (
token = 'b6wKKWD6cRx8/oQtnJfeR+rltQZ+drzJBrHlxgDqmZI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)