UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WJW+fIojOTOvnrQi6QUU+FWd22KNX2QWooRiW0S2rQ0='
WHERE
key_id = 'ca8cdf1e2221babd9dec36456bf46a362071bd9547468f765d5212e89422e710'
AND (
token = 'WJW+fIojOTOvnrQi6QUU+FWd22KNX2QWooRiW0S2rQ0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)