UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v4co2WRoJyp6icv0N2p+PfAtm3452kXu8LxQDKYgj4M='
WHERE
key_id = '1c7332038f89d01da81ea46cfe86fbed5f430d7979d96a14b109f47cb0bbcff8'
AND (
token = 'v4co2WRoJyp6icv0N2p+PfAtm3452kXu8LxQDKYgj4M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)