UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6udk6CufvFPon8E4UKBsjYcGjcsZSPZ3FNL2xH5NA80='
WHERE
key_id = '7261f7fcb72792015e3dfebef91289ae82377f4c912376ab92284eb7e4faaa69'
AND (
token = '6udk6CufvFPon8E4UKBsjYcGjcsZSPZ3FNL2xH5NA80='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)