UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wXPqy8Fz+YAJb46587ZRP0Br6OoLqusaTjByOd20FbA='
WHERE
key_id = 'b26801839c2d3b16dd9505091a36d24b2109af678f4c3654776c20f35972b9eb'
AND (
token = 'wXPqy8Fz+YAJb46587ZRP0Br6OoLqusaTjByOd20FbA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)