UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VJ+2TRyPmPc65zrJdjPxMVWLQQEMFg+yZ3ZG6MAAekc='
WHERE
key_id = '9fe0d88970cee00d18f70c8119f448fba938af3b9587c4eded679cd8887f76e9'
AND (
token = 'VJ+2TRyPmPc65zrJdjPxMVWLQQEMFg+yZ3ZG6MAAekc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)