UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RHGEDBFLpLnAPbGItcbWimb/+d/ohQ4ZnfbV3Z/Z++M='
WHERE
key_id = '99afb5ab11ffda0a4521e2a2a98df15e1059186d6dcbbbf5a25d9deb6c181f43'
AND (
token = 'RHGEDBFLpLnAPbGItcbWimb/+d/ohQ4ZnfbV3Z/Z++M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)