UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qrzDizCxHUrVAb8rN97xFNCteT78qFUhTd3VUEQD/W0='
WHERE
key_id = 'fb3468a83cb2be2dd7529ae7ca85ef3e944406eef5f2433a96f62688b55edb72'
AND (
token = 'qrzDizCxHUrVAb8rN97xFNCteT78qFUhTd3VUEQD/W0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)