UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6Kl7MM5LYyiXra6VekJGO9UybKygFgW7+l8ptk7OI54='
WHERE
key_id = '5c3ce8e880494b31d442fb7bf288868f33ba925157b7920dd940bda8e4d886e6'
AND (
token = '6Kl7MM5LYyiXra6VekJGO9UybKygFgW7+l8ptk7OI54='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)