UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9PeKz/iFK81/DvvpExllnsyPPiZB9CNEwaAi2KpZxVg='
WHERE
key_id = '06fc3182f1d88a773dfbffe552453892f269332f950b82c001ffbb22fb251932'
AND (
token = '9PeKz/iFK81/DvvpExllnsyPPiZB9CNEwaAi2KpZxVg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)