UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M96PvL60562j3prXeQo9wxbXUT//0GCVfU0GWTIOHLc='
WHERE
key_id = 'eaa45eebc66d69d065ae116b0eb35e7f896fe43c7e69680dbab424835a7ad052'
AND (
token = 'M96PvL60562j3prXeQo9wxbXUT//0GCVfU0GWTIOHLc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)