UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/cntg3w5Xk6aDXgZAb3N2tECK/pe5/kFtz+d6E0dpuI='
WHERE
key_id = 'c95cea6a74f6bad5c676980db530aa4bf2505b79f73d024a84db9330f5512ba3'
AND (
token = '/cntg3w5Xk6aDXgZAb3N2tECK/pe5/kFtz+d6E0dpuI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)