UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3FSotq/SSx+UopaQBV89+GKpHaLhQ60Y23RcOyvVI5Q='
WHERE
key_id = '9b5ef4070521443711a39edad90ae98ffb418ef1cb621a47f2d8ea355cbfd11e'
AND (
token = '3FSotq/SSx+UopaQBV89+GKpHaLhQ60Y23RcOyvVI5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)