UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4JwbYJg4wuS09LP2XipvXhtrYhzrxTpzW2yTHNqlAgQ='
WHERE
key_id = 'dec8bd6668ca40e1884384bf1e651b69f6d4da51b5823640ef0d80015d3cce3c'
AND (
token = '4JwbYJg4wuS09LP2XipvXhtrYhzrxTpzW2yTHNqlAgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)