UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oZEQlPR7vB3l76H0sWxUAxoKh6hpllxuybNJyNG2Q6g='
WHERE
key_id = '44ac9188005f5cc65aca8df55efeaa1dcbf2d3825ac172ae432c920466b0d0ad'
AND (
token = 'oZEQlPR7vB3l76H0sWxUAxoKh6hpllxuybNJyNG2Q6g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)