UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7uV5Ql8qUFoCBvk9sYdHcYZ2kN8eAll3RSmEzdDDqHM='
WHERE
key_id = '62dfc999466352b43388f6e3f96471af00c9c6a16bb35316b8ef8e80c83dabe8'
AND (
token = '7uV5Ql8qUFoCBvk9sYdHcYZ2kN8eAll3RSmEzdDDqHM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)