UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vl3GEXZQ4xVc987djUbc/p8tnQANXZCqxr0NX2QWyl0='
WHERE
key_id = '2c832546e796d1b70a7fbc929ba844922cc47f0a1b5b9733b88fcb4b9b91a56f'
AND (
token = 'Vl3GEXZQ4xVc987djUbc/p8tnQANXZCqxr0NX2QWyl0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)