UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HxQOxGjgClIJRtww+tzwxA/13pcOdxzi039kQfMfZFg='
WHERE
key_id = '6b00411b4fc59d4320a171b5f9ded7a0c08ea9f80f765e6cec2bc5f6bd553f92'
AND (
token = 'HxQOxGjgClIJRtww+tzwxA/13pcOdxzi039kQfMfZFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)