UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jGOGVIdflVJgncqhEuY/DTw1hamj/kgtZUkmzWWHsNo='
WHERE
key_id = '61685d4a8b403ba0330e3ea211c9345a21dcd35e5a7823455d3d9f25eb18077e'
AND (
token = 'jGOGVIdflVJgncqhEuY/DTw1hamj/kgtZUkmzWWHsNo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)