UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mZeG4BEenaE7gBfwA47zwj7Qm1LzmtscwC6SXsDoX5M='
WHERE
key_id = '4775df2c49f691262819ac9e563106a7cf34f73bdd5eb089ac8874e6e8aaf684'
AND (
token = 'mZeG4BEenaE7gBfwA47zwj7Qm1LzmtscwC6SXsDoX5M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)