UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '28f0huu6XG6mFHoWoMAM8o4UJBkm3Yfou2sAqHu+VRw='
WHERE
key_id = '193e74df1917d34bd42aed63f4f60adf46b143e41b0a54b04fdbda0724a647e6'
AND (
token = '28f0huu6XG6mFHoWoMAM8o4UJBkm3Yfou2sAqHu+VRw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)