UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9nwwFhDgw2mjSIAJyhpMZ+Xgab6g7dnSGmtGaROR5Ew='
WHERE
key_id = '6fc34f3a06976edb87f495f8d509aa951f0195692f102fdd6aadc740ad52c9bc'
AND (
token = '9nwwFhDgw2mjSIAJyhpMZ+Xgab6g7dnSGmtGaROR5Ew='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)