UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Kk7soi+IxUVFaQkPQZXCElH37eaM1VVUpgh8IGOeAzE='
WHERE
key_id = '619a720d5a2f0894cc198a740201b88f3018be805690570b1521b3238a245cea'
AND (
token = 'Kk7soi+IxUVFaQkPQZXCElH37eaM1VVUpgh8IGOeAzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)