UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vs8nsw7MgduOS0j03IR3QSVO+wjYPZUfrHJ7WxpTDZM='
WHERE
key_id = '6b49b6800170144f456fbe4ee3ccdf3ac05e5de3a1f004d268d15dc6d891a11b'
AND (
token = 'Vs8nsw7MgduOS0j03IR3QSVO+wjYPZUfrHJ7WxpTDZM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)